<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="icon" href="/images/chiji.ico" type="image/x-icon">
    <link rel="stylesheet" href="/css/shopcart.css">
    <title>购物车</title>
</head>

<body>
    <header></header>
    <section>
        <div class="container">
            <div class="shopping" id="shopping_car">
            </div>

            <script type="text/html" id="srcShop">
                <table cellspacing="0" cellpadding="0">
                    <thead class="nav_shop">
                        <tr>
                            <th width="160px">
                                <a href="javascript:;" id="edit" style="color:#666666">购物商店</a>
                                <label class="check-label">
                                <input type="checkbox" id="all-check">
                                <span class="check-span">
                                <span class="check-item"></span>
                                </span>
                            </label>
                            </th>
                            <th width="310px">商品信息</th>
                            <th width="240px">单价(元)</th>
                            <th width="90px">数量</th>
                            <th width="200px">金额(元)</th>
                            <th width="200px">操作</th>
                        </tr>
                    </thead>
                    <tbody class="shop_cont" id="shop-list">
                        {{each cartList shop}}
                        <tr data-id="{{shop.id}}">
                            <td>
                                <label class="check-label">
                          <input type="checkbox" {{shop.check ? 'checked' : ''}} />
                          <span class="check-span">
                            <span class="check-item"></span>
                          </span>
                      </label>

                            </td>
                            <td>
                                <a href="/html/detail.html?id={{shop.id}}">
                                    <img src="{{shop.photo.url}}" alt="商品图">
                                </a>
                                <span>{{shop.title.slice(0,7)}}</span>
                            </td>
                            <td>
                                <span><span class="now-price">{{shop.price.toFixed(2)}}元</span><span class="origin-price">{{shop.originPrice}}元</span></span>
                            </td>
                            <td>
                                <a href="javaScript:;" class="minus" id="minus">-</a>
                                <input type="text" value="{{shop.num}}">
                                <a href="javaScript:;" class="plus">+</a>
                            </td>
                            <td>￥{{(shop.price * shop.num).toFixed(2)}}</td>
                            <td> <a href="javaScript:;" id="delbtn" class="delbtn">删除</a></td>
                        </tr>
                        {{/each}}
                    </tbody>
                    <tfoot class="shop_submit">
                        <tr>
                            <!-- <td width="190px">
                                 <input type="checkbox" id="selectAllBox" checked/> 
                            <p id="All">
                                    <a href="javaScript:;" id="clearAll">删除/</a>
                                    <a href="javaScript:;" id="cancel">取消编辑</a>
                                </p> 
                            </td>-->
                            <td width="200px"></td>
                            <td width="200px"></td>
                            <td width="190px"></td>
                            <td width="190px"></td>
                            <td width="800px">
                                <span>已选商品<b class="totalprice-color" id="totalNum"></b>件</span>
                                <span>总价：</span>
                                <em>￥</em>

                                <span id="Paymoney" class="totalprice-color"></span>
                            </td>
                            <td width="180px">
                                <a href="/html/paymoney.html" id="indent">去结算</a>
                            </td>
                        </tr>
                    </tfoot>
                </table>
            </script>

            <div class="empty" id="cart-empty">
                <p>购物车空空如也，赶紧选购我们的商品吧！<a href="/html/shoplist.html">去逛逛</a></p>
            </div>
        </div>
    </section>
    <footer></footer>
    <div class="totop" style="color: #ff0000;background: #ccc; width: 100px;text-align: center">返回顶部</div>
</body>
<script src="/libs/require/require.min.js" data-main="/js/shopcart"></script>

</html>